// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.modules.dao.impl;

import com.liuxinlong.modules.dao.SpecificationDao;
import com.liuxinlong.modules.entity.Specification;
import com.liuxinlong.modules.mapper.SpecificationMapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 类描述
 * <p>
 * 此类关联设计的功能
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022年3月4日
 */
@Service
public class SpecificationDaoImpl extends ServiceImpl<SpecificationMapper, Specification>
		implements SpecificationDao {

	@Override
	public List<Specification> pageSpecificationList(Map<String, Object> queryParam) {
		return baseMapper.pageSpecificationList(queryParam);
	}

	@Override
	public int getSpecificationCount(Map<String, Object> queryParam) {
		return baseMapper.getSpecificationCount(queryParam);
	}

	@Override
	public void addSpecification(Specification Specification) {
		this.baseMapper.insert(Specification);
	}

	@Override
	public void updateSpecification(Specification Specification) {
		this.baseMapper.updateById(Specification);
	}

	@Override
	public void deleteSpecification(String id) {
		this.baseMapper.deleteById(id);
	}

	@Override
	public Map<String, Map<String, String>> getSpecificationMap() {
		return baseMapper.getSpecificationMap();
	}

	@Override
	public Specification getSpecificationById(String id) {
		return baseMapper.selectById(id);
	}

	@Override
	public List<Specification> getSpecificationList() {
		return baseMapper.getSpecificationList();
	}

	@Override
	public Specification getSpecificationByName(String name) {
		return baseMapper.getSpecificationByName(name);
	}

}
